package com.dingreading.cloud.soms.service;

import com.dingreading.cloud.common.dto.StoreProjectsDto;
import com.dingreading.cloud.common.util.PageUtil;
import com.dingreading.cloud.soms.dto.StoreProjectsDtoV2;
import com.dingreading.cloud.soms.entity.StoreProjects;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.util.List;

/**
 * 服务层。
 *
 * @author Administrator
 * @since 2024-09-11
 */
public interface StoreProjectsService extends IService<StoreProjects> {


    /**
     * 加盟店分页
     */
    Page<StoreProjectsDto> storeProjectPageV3(
            PageUtil pageUtil, String storeUid, String keyword, Integer lessonStatus, Integer freeStatus,
            Integer enabled, List<Integer> cooperationTypes, Integer operationType, List<Long> projectIdList
    );

    Page<StoreProjectsDto> storeProjectPageV5(
            PageUtil pageUtil, String storeUid, String keyword, Integer lessonStatus, Integer freeStatus,
            Integer enabled, List<Long> projectIdList
    );


    boolean updateEnabledV2(String storeUid, String uid, Integer enabled, String staffUid, String staffName);

    int dropBean(String storeUid, String uid);

    boolean haveNameV2(String storeUid, String uid, String productName);

    StoreProjects getByUid(String uid);

    List<StoreProjects> listByUids(List<String> uids);

    int getMaxOrderNum(String storeUid);

    StoreProjects getGtShowOrder(String storeUid, Integer orderNum);

    StoreProjects getLtShowOrder(String storeUid, Integer orderNum);

    /**
     * 设置序号
     */
    boolean updateOrderNum(String storeUid, String uid, Integer orderNum, String staffUid, String staffName);

    StoreProjects getByStoreUidAndUid(String storeUid, String uid);

    List<StoreProjectsDtoV2> dtoListByStoreUidAndSelfStoreV2(
            String storeUid, String keyword, Integer lessonStatus, Integer freeStatus,
            String cooperationTypeSql, String operationTypeSql,
            List<Long> projectIdList
    );

    List<StoreProjectsDtoV2> dtoListByStoreUidAndSelfStoreV5(
            String storeUid, String keyword, Integer lessonStatus, Integer freeStatus,
            List<Long> projectIdList
    );

    StoreProjectsDto getDtoByUid(String uid);

    boolean updateInfoV2(String storeUid, String uid, String projectName, String staffUid, String staffName);

    StoreProjects getByProjectName(String projectName);
}
